package com.xiansiblog.controller;

import com.xiansiblog.service.FriendLinkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
*@Description: 友链显示控制器
*@Author: 弦思
*@Date 2021/2/3
*/
@Controller
public class FriendsShowController {
    @Autowired
    private FriendLinkService friendLinkService;

    @GetMapping("/friends")
    public String friends(Model model){
        model.addAttribute("friendlinks", friendLinkService.listFriendLink());
        return "friends";
    }
}
